import { registerControlProvider, ControlType } from '@ibiz-template/runtime';
import { withInstall } from '@ibiz-template/vue3-util';
import { App } from 'vue';
import { ListExtviewControl } from './list';
import { ListExtviewProvider } from './list.provider';

export * from './list.provider';

export const IBizListExtviewControl = withInstall(
  ListExtviewControl,
  function (v: App) {
    v.component(ListExtviewControl.name, ListExtviewControl);
    registerControlProvider(
      `${ControlType.LIST}_EXTVIEW1`,
      () => new ListExtviewProvider(),
    );
  },
);

export default IBizListExtviewControl;
